package cn.engage.ekcc.domain;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author director
 * @since 2022-11-18
 */
@TableName("t_product_buy")
public class ProductBuy extends Model<ProductBuy> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    /**
     * 0为待审核，1为审核通过，-1为审核未通过
     */
    private Integer type;
    /**
     * 产品id
     */
    @TableField("product_id")
    @NotNull(message = "审核产品不能为空")
    private Long productId;
    /**
     * 备注
     */
    @NotEmpty(message = "审核备注不能为空")
    private String note;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProductBuy{" +
        ", id=" + id +
        ", type=" + type +
        ", productId=" + productId +
        ", note=" + note +
        "}";
    }
}
